package com.liuhan.house.service.impl;

import com.liuhan.house.dao.CommunityMapper;
import com.liuhan.house.pojo.Community;
import com.liuhan.house.service.CommunityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommunityServiceImpl implements CommunityService {

    @Autowired
    private CommunityMapper communityMapper;

    /**
     * 获取所有的城市小区信息
     * @return
     */
    @Override
    public List<Community> getAll() {

        return communityMapper.getAll();
    }

    /**
     * 根据城市名获取小区名称
     * @param cityName
     * @return
     */
    @Override
    public List<Community> getByCityName(String cityName) {
        return communityMapper.getByCityName(cityName);
    }
}
